home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 February
/
EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso
/
earcd
/
util4
/
0utils.lha
/
0Utils
/
SRun.data
< prev
next >
Wrap
Text File
|
1995-09-05
|
2KB
|
88 lines
#ifdef TPLTER
SRun = {
SHORT = {{ run a program synchroneously }};
DESCRIPTION = {{
Run a command synchroneously (usable e.g. to
redirect a script)
This simple program does not more than
call 'SystemTags' with its arguments.
U wanna know the purpose of such a program?
Have U ever tried to redirect the output
of a Dos script? No chance!
> echo "echo Hallo" | execute > t:t in:
"Hallo"
in fact execute does _not_ take any respect
of any I/O redirections (it seems like this
in caused by the fact, that "Execute" itself
is part of the Shell). The solution would
have been usage of "Run" since that command
spawns a new process, whose stdio channels
can be redirected. But what happenes, if we
can not use a asynchroneous process? (e.g.
cause we wanna use the normal console input)
Now, that is the purpose of "SRun".
RESULT
STDOUT: the output of the 'command' execution.
RC: returnvalue of SystemTags() or >=10
}};
NOTES = {{
SRun* does currently ignore ReadArgs, this is due
to a bug(?) in readargs that removes some whitespace
and quotes from argstring even with /F option
}};
//BUGS = {{
// "SRun COMMAND commandstring" fails; U _MUST_ use
// "SRun commandstring"
//}};
EXAMPLES = {{
>SRun echo hallo
"hallo"
}};
HISTORY = {{
20-02-95 b_noll created
21-02-95 b_noll added version/format-prefix/offset
20-03-95 b_noll added args diagnostics
09-04-95 b_noll shortened the file: arg Parsing dropped, removed NP_tags
19-08-95 b_noll created .data file
}};
includes = { "<dos/dostags.h>" };
Template = "/F/A";
Arguments = {{
STRPTR command;
}};
version = "1.2";
body = {{
// STRPTR template = FORMATPREFIX FORMAT;
retval = SystemTagList (GetArgStr(), NULL);
//TAG_IGNORE, template,
//TAG_END);
if (retval == -1) {
retval = RETURN_ERROR;
} /* if */
}};
};
#endif